package cn.yangliu.nacos.management.service.oauth2;

import cn.yangliu.jpa.base.service.JpaService;
import cn.yangliu.nacos.comm.model.Oauth2InsertModel;
import cn.yangliu.nacos.comm.model.Oauth2UpdateOtherModel;
import cn.yangliu.nacos.comm.model.Oauth2UpdateOtherPasswordModel;
import cn.yangliu.nacos.comm.model.Oauth2UserModel;
import cn.yangliu.nacos.management.entity.oauth2.Oauth2User;

/**
 * The type of nacos.
 *
 * @author 问道于盲
 * @date 2020 -01-01
 */
public interface Oauth2UserService extends JpaService<Oauth2User, Long> {

    /**
     * Insert oauth 2 user model.
     *
     * @param model the model
     * @param token the token
     * @return the oauth 2 user model
     */
    Oauth2UserModel insert(Oauth2InsertModel model, String token);

    /**
     * Update oauth 2 user model.
     *
     * @param model the model
     * @param token the token
     * @return the oauth 2 user model
     */
    Oauth2UserModel update(Oauth2UpdateOtherModel model, String token);

    /**
     * Update password boolean.
     *
     * @param model the model
     * @param token the token
     * @return the boolean
     */
    boolean updatePassword(Oauth2UpdateOtherPasswordModel model, String token);

}
